﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Medianamik.Service.ActiveDirectory.Configuration;
using Medianamik.Service.ActiveDirectory.Service;
using StructureMap;

namespace Medianamik.Service.ActiveDirectory.UI.Control
{
    public class ActiveDirectoryGroups : GroupsDropDownList
    {
        protected override IEnumerable<string> AllGroups
        {
            get 
            {
                var domainService = new Container(new Registratrion.ServiceRegistry()).GetInstance<IDomainService>(); // ObjectFactory.GetInstance<IDomainService>();
                return domainService.GetAllGroupNames();
            }
        }
    }
}